
#include "stdio.h"
#include <stdint.h>
#include "../section_locate.h"
#include "pt-thread.h"
#include "my_utils.h"
void hello_all(void);
static char name[30] = "hello_all";
struct func_pack sec_hello_all __attribute__ ( ( section ( "func_area" ) ) ) = {
    .func_addr = hello_all,
	.name_str = (uint32_t *)&name,
};

#include <string.h>


void my_check_handler(const char *ex_string, int32_t alert_lvl, const char *func, uint32_t line)
{
    switch(alert_lvl){
        case RED_SEVERE:
            printf("RED_SEVERE\n");
            break;
        case ORANGE_HIGH:
            break;
        case YELLOW_ELEVATED:
            break;
        case BLUE_GUARDED:
            break;
        case GREEN_LOW:
            break;
        default:
            break;
        //
    }

}
DEFINE_STACK(my_stack, 8 , sizeof(int) );
long int ssss = __STDC_VERSION__;
void hello_all(void)
{
    printf("ssss = %ld\n", ssss);
    CHECK_GLOBAL(1 == 2, 1, 1, NULL);

    stack_t * stack_test = stack_create(sizeof(double) * 2, sizeof(double) );

    CHECK_SIMP(stack_test != NULL, 1);

    int a = 9;
    CHECK_SIMP(stack_push(my_stack, &a) == STACK_STATUS_OK, 1);
    a = 0x6655AA11;
    CHECK_SIMP(stack_push(my_stack, &a) == STACK_STATUS_OK, 1);
    CHECK_SIMP(stack_push(my_stack, &a) == STACK_STATUS_OK, 1);
    a = 0;
    CHECK_SIMP(stack_pop(my_stack, &a) == STACK_STATUS_OK, 1);
    printf("a = %d \n", a);
    CHECK_SIMP(stack_pop(my_stack, &a) == STACK_STATUS_OK, 1);
    printf("a = %d \n", a);
    CHECK_SIMP(stack_pop(my_stack, &a) == STACK_STATUS_OK, 1);

	printf("hello_all \n");
}


